import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
import Home from '@/pages/home/Home.vue';

const routes = [
    {
        path: '/',
        component: Home,
    },
    {
        path: '/:category',
        component: Home,
    },

];

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

// 路由全局前置守卫
router.beforeEach((to, from, next) => {
    next();
});


export default router;